﻿using MediatR;
using Volo.Abp.Domain.Entities;

namespace Ebusiness_OrderService.DomainEvent
{
    public abstract class BaseDomainEvents : AggregateRoot<Guid>, IDomainEvents
    {
        private readonly List<INotification> notifications = new List<INotification>();
        public void AddDmoainEvent(INotification notification)
        {
            notifications.Add(notification);
        }

        public IEnumerable<INotification> GetDmoainEvents()
        {
            return notifications;
        }

        public void ClearDmoainEvent()
        {
            notifications.Clear();
        }
    }
}
